package com.weiwei.diancan.utils;

import android.text.Editable;
import android.text.TextUtils;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

import weiwei.com.weiweilibrary.views.ToastUtil;

/**
 * Created by BMW on 2016/11/6.
 */
public class ViewGetTextUtils {

    public static String getEditText(EditText view,String message){
        String text = view.getText().toString();
        if(TextUtils.isEmpty(text)){
            view.setError(message);
            return null;
        }
        return text;
    }
}
